﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace iS3.Server.MetaConfig.Models
{
    public class LangDict : Dictionary<LangType, string>
    {
        public static LangDict getByChs(string chsName)
        {
            return new LangDict() { { LangType.zh, chsName } };
        }
        public static LangDict getByEn(string enName)
        {
            return new LangDict() { { LangType.en, enName } };
        }
        public string getChs()
        {
            if (this.ContainsKey(LangType.zh))
            {
                return this[LangType.zh];
            }
            else
            {
                return null;
            }
        }
        public string getEn()
        {
            if (this.ContainsKey(LangType.en))
            {
                return this[LangType.en];
            }
            else
            {
                return null;
            }
        }
    }
}
